package com.example.tinxi.data.structure.tree;

/**
 * 字典树的节点类型
 * @author tinxi
 * @create 2019-01-14 15:18:23
 */
public class TrieNode {

	final int MAX_SIZE = 26;

	char ch; // node-value 当前节点所存储的内容

	int frequency; //记录单词出现次数

	TrieNode[] childrenNodes; // 子树

	boolean isEndNode = false; // 是否叶子节点

	public TrieNode(char ch, TrieNode[] childrenNodes, boolean isEndNode) {
		this.ch = ch;
		this.childrenNodes = childrenNodes;
		this.isEndNode = isEndNode;
	}
	public TrieNode(char ch) {
		this.ch = ch;
		this.childrenNodes = new TrieNode[MAX_SIZE];
		this.isEndNode = false;
	}
	public TrieNode() {
		this.childrenNodes = new TrieNode[MAX_SIZE];
		this.isEndNode = false;
	}
}